{eval
	$specialarr = array(0 => array('thread', '{lang index_posts}'), 1 => array('poll', '{lang thread_poll}'), 2 => array('trade', '{lang thread_trade}'), 3 => array('reward', '{lang thread_reward}'), 4 => array('activity', '{lang thread_activity}'), 5 => array('debate', '{lang thread_debate}'));
	$specialtype = $specialarr[$_G['forum_thread']['special']];
	$_G[home_tpl_titles][] = $navsubject;
	$_G[home_tpl_titles][] = $specialtype[1];
	$_G[home_tpl_titles][] = '{lang portal}';
	$navtitle = '';
}

{subtemplate common/header}

<script type="text/javascript">var fid = parseInt('$_G[fid]'), tid = parseInt('$_G[tid]');</script>
<!--{if $_G['forum']['ismoderator']}-->
	<script type="text/javascript" src="{$_G['setting']['jspath']}forum_moderate.js?{VERHASH}"></script>
	<form method="post" autocomplete="off" name="modactions" id="modactions">
	<input type="hidden" name="formhash" value="{FORMHASH}" />
	<input type="hidden" name="optgroup" />
	<input type="hidden" name="operation" />
	<input type="hidden" name="listextra" value="$_G[gp_extra]" />
	</form>
<!--{/if}-->

<script type="text/javascript" src="{$_G['setting']['jspath']}forum_viewthread.js?{VERHASH}"></script>
<script type="text/javascript">zoomstatus = parseInt($_G['setting']['zoomstatus']);var imagemaxwidth = '{IMAGEMAXWIDTH}';var aimgcount = new Array();</script>

<div id="pt" class="wp">
	<a href="index.php" id="fjump"{if $_G['setting']['forumjump'] == 1} onmouseover="showMenu({'ctrlid':this.id})"{/if} class="nvhm">$_G[setting][bbname]</a> $navigation &rsaquo; {lang user_threads}
</div>

<style id="diy_style" type="text/css"></style>
<div class="wp">
	<!--[diy=diy1]--><div id="diy1" class="area"></div><!--[/diy]-->
</div>

<div id="ct" class="wp cl">
	<div class="mn">
		<div class="ch">
			<label class="wx portal"><a href="portal.php">{lang portal}</a></label>
		</div>

		<div class="bm vw pl">
			<div class="h">
				<h1 class="ph">$_G[forum_thread][subject]</h1>
				<p class="xg1 mbm">
					{lang posted_by}: <a href="home.php?mod=space&uid=$_G[forum_thread][authorid]">$_G[forum_thread][author]</a><span class="pipe">|</span>
					{lang dateline}: <!--{date($_G[forum_thread][dateline])}--><span class="pipe">|</span>
					{lang home_view_num}: $_G[forum_thread][views]<span class="pipe">|</span>
					{lang comment_num}: $_G[forum_thread][replies]
					<!--{if $_G['group']['raterange'] && $post['authorid']}-->
					<span class="pipe">|</span><a href="javascript:;" onclick="showWindow('rate', 'forum.php?mod=misc&action=rate&amp;tid=$_G[tid]&amp;pid=$post[pid]{if $_G[gp_from]}&from=$_G[gp_from]{/if}');return false;">{lang rate}</a>
					<!--{/if}-->
					<!--{if (($_G['forum']['ismoderator'] && $_G['group']['alloweditpost'] && (!in_array($post['adminid'], array(1, 2, 3)) || $_G['adminid'] < $post['adminid'])) || ($_G['forum']['alloweditpost'] && $_G['uid'] && $post['authorid'] == $_G['uid']))}-->
					<span class="pipe">|</span><a href="forum.php?mod=post&action=edit&amp;fid=$_G[fid]&amp;tid=$_G[tid]&amp;pid=$post[pid]{if !empty($_G[gp_modthreadkey])}&amp;modthreadkey=$_G[gp_modthreadkey]{/if}&amp;page=$page{if $_G[gp_from]}&from=$_G[gp_from]{/if}"><!--{if $_G['forum_thread']['special'] == 2 && !$post['message']}-->{lang post_add_aboutcounter}<!--{else}-->{lang edit}</a><!--{/if}-->
					<!--{/if}-->
				</p>
			</div>
			<div class="d">
				<table cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td>{subtemplate forum/viewthread_node_body}</td>
					</tr>
				</table>
			</div>
			<!--{if !empty($aimgs[$post[pid]])}-->
			<script type="text/javascript" reload="1">aimgcount[{$post[pid]}] = [{echo implode(',', $aimgs[$post[pid]]);}];attachimgshow($post[pid]);</script>
			<!--{/if}-->
		</div>

		<div class="vw bm" id="comment">
			<h2>{lang latest_comments}</h2>
			<!--{loop $postlist $postid $post}-->
				<!--{if $postid && !$post['first']}-->
				<div id="post_$post[pid]" class="xld xlda mbm">
					{subtemplate forum/viewthread_from_node}
				</div>
				<!--{/if}-->
			<!--{/loop}-->
			<div id="postlistreply" class="xld xlda mbm"><div id="post_new" class="viewthread_table" style="display: none"></div></div>
			<!--{if $multipage}-->
			<div class="pgs cl">$multipage</div>
			<!--{/if}-->

			<!--{if $_G['setting']['fastpost'] && $allowpostreply && !$_G['forum_thread']['archiveid']}-->
				{subtemplate forum/viewthread_fastpost}
			<!--{/if}-->
		</div>

	</div>
	<div class="sd">
		<!--{template common/userabout}-->
		{hook/viewthread_side_bottom}
		<div class="drag">
			<!--[diy=diy2]--><div id="diy2" class="area"></div><!--[/diy]-->
		</div>
	</div>
</div>

<div class="wp mtn">
	<!--[diy=diy3]--><div id="diy3" class="area"></div><!--[/diy]-->
</div>

{subtemplate common/footer}